/*
 * @Description:
 * @Author: shilinzhou
 * @Date: 2024-02-02 10:18:45
 * @LastEditors: shilinzhou
 * @LastEditTime: 2024-02-26 13:45:57
 */
import { ParamsPage, ResponsePage } from '@/api/common/type';

// 排程明细 自制生产 + 外购/委外 搜索数据
export type OrderListParams = ParamsPage & SearchParams;
// 排程明细 自制生产 + 外购/委外 搜索参数
export interface SearchParams {
    materialName: string;
    materialCode: string;
    productionType?: string;
}

// 排程明细 自制生产 返回数据
export interface SelfControlResponse extends ResponsePage {
    records: SelfControlRecord[];
}

// 排程明细 自制生产 列表数据
export interface SelfControlRecord {
    id: number;
    orderNumber: string;
    materialName: string;
    customerCode: string;
    demandQuantity: number;
    plannedQuantity: number;
    completedQuantity: number;
    unfinishedQuantity: number;
    orderProgress: string;
    plannedStartTime: string;
    plannedEndTime: string;
    actualCompletionTime: string;
}

// 排程明细 外购/委外列表 返回数据
export interface UnSelfControlResponse extends ResponsePage {
    records: UnSelfControlRecord[];
}

// 排程明细 外购/委外 列表数据
export interface UnSelfControlRecord {
    id: number;
    orderNumber: string;
    materialName: string;
    customerCode: string;
    demandQuantity: number;
    plannedQuantity: number;
    completedQuantity: number;
    unfinishedQuantity: number;
    orderProgress: string;
    plannedStartTime: string;
    plannedEndTime: string;
    actualCompletionTime: string;
    unit: string;
}

// 工序明细 搜索数据
export type ProcessParams = ParamsPage & SearchParamsProcess;

// 工序明细 搜索参数
export interface SearchParamsProcess {
    orderNumber: string;
    materialName: string;
    materialCode: string;
    processName: string;
    processCode: string;
    equipmentName: string;
    equipmentCode: string;
    auxiliaryDataName: string;
    auxiliaryDataCoding: string;
    workshopName: string;
}

// 工序明细 返回数据
export interface ProcessResponse extends ResponsePage {
    records: ProcessRecord[];
}

// 工序明细 列表数据
export interface ProcessRecord {
    orderNumber: string;
    processNumber: number;
    processName: string;
    processCode: string;
    processDescription: string;
    materialName: string;
    materialCode: string;
    workshopName: string;
    equipmentName: string;
    equipmentCode: string;
    auxiliaryDataName: string;
    auxiliaryDataCoding: string;
    plannedStartTime: string;
    plannedEndTime: string;
    actualEndTime: string;
    demandQuantity: number;
    plannedQuantity: number;
    completedQuantity: number;
    processSchedule: string;
}
